package com.jerry.netty;

import com.jerry.netty.http.JerryReponse;
import com.jerry.netty.http.JerryRequest;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;

/**
 * Created by Shirly on 2016/12/16.
 */
public class MyServlet extends StandardServlet {

    @Override
    public void doGet(JerryRequest request, JerryReponse reponse) {

        doPost(request,reponse);
    }

    @Override
    public void doPost(JerryRequest request, JerryReponse reponse) {
//        System.out.println("这就是我们自己的业务逻辑");
        String param = "hello";
        String val = request.getParamter(param);
        reponse.write(param+ ": "+val,200);
    }
}
